﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BUGCOME.Model.Auth.dto
{
    /// <summary>聊天消息数据传输对象</summary>
    public class ChatMessageDto
    {
        /// <summary>发送者信息</summary>
        public ChatUserDto FromUser { get; set; }
        /// <summary>是否自己发送</summary>
        public bool Self { get; set; }
        /// <summary>消息ID（主键）</summary>
        [SugarColumn(IsPrimaryKey = true)]
        public string ChatId { get; set; }
        /// <summary>消息类型：0文本/1图片/2文件/3语音/4视频</summary>
        public int MsgType { get; set; }
        /// <summary>存储键</summary>
        public string StoredKey { get; set; }
        /// <summary>发送者用户ID</summary>
        public long UserId { get; set; }
        /// <summary>接收者用户ID</summary>
        public long ToUserId { get; set; }
        /// <summary>消息内容（媒体类型为URL）</summary>
        public string Message { get; set; }
        /// <summary>发送时间戳</summary>
        public long ChatTime { get; set; }
        /// <summary>在线状态</summary>
        public int Online { get; set; }
    }

    /// <summary>聊天用户信息数据传输对象</summary>
    public class ChatUserDto
    {
        /// <summary>用户名</summary>
        public string UserName { get; set; }
        /// <summary>昵称</summary>
        public string NickName { get; set; }
        /// <summary>头像URL</summary>
        public string Avatar { get; set; }
    }
}